﻿@model Project.Models.WarehouseItems

@{
    ViewBag.Title = "Visszavét";
}

<h2>Visszavét</h2>

@using (Html.BeginForm())
{
    @Html.AntiForgeryToken()

    <div class="form-horizontal">
        <h4>Raktár</h4>
        <hr />
        @Html.ValidationSummary(true, "", new { @class = "text-danger" })
        @Html.HiddenFor(model => model.WarehouseItem_Id)
        @Html.HiddenFor(model => model.DateDelete)
        @Html.HiddenFor(model => model.UserDelete)
        @Html.HiddenFor(model => model.PickingStock_Id)
        @Html.HiddenFor(model => model.ReserveStock_Id)
        @Html.HiddenFor(model => model.Space_Id)

        <div class="form-group">
            @Html.LabelFor(model => model.Item_Id, "Cikk", htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.DropDownList("Item_Id", null, htmlAttributes: new { @class = "form-control" })
                @Html.ValidationMessageFor(model => model.Item_Id, "", new { @class = "text-danger" })
                @Html.ActionLink("Új cikk", "Create", "ItemStocks", null, new { @class = "btn btn-default" })
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(model => model.Quantity, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Quantity, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Quantity, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Unit, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Unit, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Unit, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ItemNumber, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ItemNumber, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.ItemNumber, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.Note, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.Note, new { htmlAttributes = new { @class = "form-control" } })
                @Html.ValidationMessageFor(model => model.Note, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.UserIn, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.UserIn, new { htmlAttributes = new { @class = "form-control", @Value = User.Identity.Name } })
                @Html.ValidationMessageFor(model => model.UserIn, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.DateIn, htmlAttributes: new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.DateIn, new { htmlAttributes = new { @class = "form-control", @Value = DateTime.Now.ToString("yyyy.MM.dd. HH:mm:ss") } })
                @Html.ValidationMessageFor(model => model.DateIn, "", new { @class = "text-danger" })
            </div>
        </div>

        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Kész" class="btn btn-default" />
            </div>
        </div>
    </div>
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
